package com.corpgovernment.common.feignRpc;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import com.corpgovernment.common.base.JSONResult;
import com.corpgovernment.common.dto.GetOrderInfoDtoReq;
import com.corpgovernment.common.dto.GetOrderInfoDtoRsp;
import com.corpgovernment.common.dto.OrderUserInfoRsp;

/**
 * @author: pwang27
 * @Date: 2023/10/8 15:35
 * @Description:
 */
@FeignClient(name = "order-center-server", qualifier = "commonOrderCenterClient",
        fallback = CommonOrderCenterClientFallBack.class)
public interface CommonOrderCenterClient {

    @PostMapping("/common/getOrderInfoBySupplierOrderId")
    JSONResult<GetOrderInfoDtoRsp> getOrderInfoBySupplierOrderId(@RequestBody GetOrderInfoDtoReq request);

    /**
     * 通过orderId查询一条订单用户信息
     *
     * @param orderId
     * @return
     */
    @PostMapping("/user/getOrderUser")
    JSONResult<OrderUserInfoRsp> getOrderUser(@RequestBody Long orderId);
}
